!function(){"use strict";var e,t,r,a,i,n,o,d,s,l,c,u,g,m,b,f,v,$=!0,h=!1,p=!0,_=!1,x=[],A="http://",C="https://",O="srcset",k="source",y="style",w="section",N="article",L="figure",V="background-image";function j(A){e=A;var C,k,w,N=!1;try{if(-1!==navigator.userAgent.indexOf("MSIE")||navigator.appVersion.indexOf("Trident/")>-1)return;if(t=document.getElementById("marvel"))N=t.getAttribute("data-testmode"),r=t.getAttribute("data-customerid"),u=t.getAttribute("data-opt");else{if(!e)return;N=A["data-testmode"],r=A["data-customerid"],u=A["data-opt"]}T("data-opt")&&(u=T("data-opt")),h=!1,(C=T("marvel-debug"))&&"true"==C&&(h=!0),N?($=!1,(w=T("marvel-testpage"))&&"true"==w&&($=!0)):($=!0,(k=T("marvel-activate"))&&"false"==k&&($=!1)),r?(r=r.trim(),0==r.length&&($=!1)):$=!1,h&&(W("marveltestmode="+N),W("marvel-testpage="+w),W("marvelopt="+u)),function u(){var m,b,f,v,A,C,O=!1;t?(m=t.getAttribute("data-cname"),b=t.getAttribute("data-domain"),A=t.getAttribute("data-url"),O=t.getAttribute("data-ignoreselfdomain"),C=t.getAttribute("data-ignorepath"),f=t.getAttribute("data-unblockurl"),g=t.getAttribute("data-droponerror"),p=t.getAttribute("data-dropsrcset")):e&&(m=e["data-cname"],b=e["data-domain"],A=e["data-url"],O=e["data-ignoreselfdomain"],C=e["data-ignorepath"],f=e["data-unblockurl"],g=e["data-droponerror"],p=e["data-dropsrcset"]),O&&"true"==O&&(_=!0),p=!!p&&"true"==p,C&&C.trim().length>0&&(x=x.concat(C.split(","))),(!m||m.trim().length<=0)&&(m="marvel-b1-cdn.bc0a.com"),m=m.trim(),v=["adminblock"];var k=0;for(k=0;k0&&(b=b.toLowerCase(),a=a.concat(b.split(","))),_&&(a=a.concat([document.location.host])),o=m+"/"+r+"/",d=window.location.protocol+"//",c=(l=window.location.host)+(s=window.location.pathname),i=["chrome-extension","adstream","/metric/","{{"],A&&A.trim().length>0&&(A=A.toLowerCase(),i=i.concat(A.split(","))),n=[],f&&f.trim().length>0&&(f=f.toLowerCase(),n=n.concat(f.split(","))),h&&(W("marvelversion=marvel-1.89.0"),W("marvelbeCDN="+o),W("marvelcustomerid="+r),W("marvelcname="+m),W("marvelblacklistcustomer="+v),W("marvelignoreselfdomain="+_),W("marveldatadomain="+b),W("marvelignoreDomain="+a),W("marveldataurl="+A),W("marvelurllist="+i),W("marveldataunblockurl="+f),W("marvelunblockurllist="+n),W("marvelprotocol="+d),W("marvelhost="+l),W("marvelpath="+s),W("marvelurl="+c),W("marvelignorepath="+x),W("marveldatadroponerror="+g),W("marveldropsrcset="+p))}();var L=0;for(L=0;L=0){$=!1;break}W("marvelactivate="+$),$&&(1==u?(v={childList:!0},(b=new MutationObserver(I)).observe(document.documentElement,v)):(f={childList:!0,subtree:!0,attributeFilter:["src",O,y]},(m=new MutationObserver(q)).observe(document.documentElement,f)))}catch(V){W(V)}}function T(e){var t=RegExp("[?&]"+e+"=([^&]*)").exec(window.location.search);return t&&decodeURIComponent(t[1].replace(/\+/g," "))}function W(e){h&&console.log(e)}function E(e){if(!e||0==(e=e.trim()).length||e.length>500||(e=e.toLowerCase()).indexOf(o)>0||e.indexOf(".svg")>=0||e.indexOf(".gif")>=0||e.indexOf(".mp4")>=0||e.indexOf(".webm")>=0||e.indexOf(".ogv")>=0)return!1;var t=function e(t){var r=t,a=t.indexOf("//");if(!(a>=0))return document.location.host;var i=(t=t.substring(a+2)).indexOf("/");return i>=0&&(r=t.substring(0,i)),"."+r}(e);W("marvelgetdomain="+t);var r=0;for(r=0;r=0)return!0;var d=0;for(d=0;d=0)return!1;var s=0;for(s=0;s=0)return!1;return!0}function M(e){if(!e)return e;e=e.trim();var t="",r=e.toLowerCase();if(0==r.indexOf(A))t=e.substring(7);else if(0==r.indexOf(C))t=e.substring(8);else if(0==r.indexOf("//"))t=e.substring(2);else{if(0==r.indexOf("data:"))return"";0==(t=new URL(e,document.baseURI).href).indexOf(A)?t=t.substring(7):0==t.indexOf(C)&&(t=t.substring(8))}return d+o+t}function z(e){var t="";if(!e)return t;var r=(e=e.trim()).split(","),a=0;for(a=0;a=0){var i=r.indexOf("url",a);if(i<0)return t;var n=r.indexOf("(",i);if(n>0){var o=r.indexOf(")",i);if(o>0){var d=e.substring(n+1,o);if(((d=d.trim()).startsWith("'")||d.startsWith('"'))&&(d=d.substring(1)),(d.endsWith("'")||d.endsWith('"'))&&(d=d.substring(0,d.length-1)),E(d)){var s=M(d);s&&s.trim().length>0&&d!=s&&(s="'"+s+"'",t=e.substring(n+1,0)+s+e.substring(o))}}}}return t}function I(e){for(r=0;r0){var t,r;"body"==t.addedNodes[0].nodeName.toLowerCase()&&(h&&W("Body found"),b.disconnect(),f={childList:!0,subtree:!0,attributeFilter:["src",O,y]},(m=new MutationObserver(q)).observe(t.addedNodes[0],f))}}var D="be_marvel",F="onerror",R="this.onerror=null;this.src='";function S(e){var t,r=e.nodeName.toLowerCase(),a=e.attributes;if("img"==r||r==k)for(t=0;t"+n),E(n)){var o=M(n);o&&o.trim().length>0&&o!=n&&(h&&W("Changing[node,"+r+","+i+"]==>"+o),a[t].nodeValue=o,"src"!=i||(e.setAttribute(D,"1"),"true"==g||e.getAttribute(F)||e.setAttribute(F,R+n+"'")))}}else if(i!=O||p){if(i==y){var d=a[t].nodeValue;h&&W("Checking[node,img/source,style]==>"+d);var s=B(d);s&&s.trim().length>0&&d!=s&&(h&&W("Changing[node,img/source,style]==>"+s),a[t].nodeValue=s,e.setAttribute(D,"1"))}}else{var l=a[t].nodeValue;h&&W("Checking[node,"+r+",scrset]==>"+l);var c=z(l);c&&c.trim().length>0&&l!=c&&(h&&W("Changing[node,"+r+",scrset]==>"+c),a[t].nodeValue=c,e.setAttribute(D,"1"))}}else if("div"==r||r==w||r==N||r==L||"a"==r)for(t=0;t"+d);var s=B(d);s&&s.trim().length>0&&d!=s&&(h&&W("Changing[node,"+r+",style]==>"+s),a[t].nodeValue=s,e.setAttribute(D,"1"))}else if(i==O&&!p){var l=a[t].nodeValue;h&&W("Checking[node,"+r+",srcset]==>"+l);var c=z(l);c&&c.trim().length>0&&l!=c&&(h&&W("Changing[node,"+r+",srcset]==>"+c),a[t].nodeValue=c,e.setAttribute(D,"1"))}}if(e.childNodes&&e.childNodes.length>0)for(var u=0;u"+a),E(a)){var i=M(a);i&&i.trim().length>0&&i!=a&&(h&&W("Changing[attribute,"+r+",src]==>"+i),e.src=i,e.setAttribute(D,"1"),"true"==g||e.getAttribute(F)||e.setAttribute(F,R+a+"'"))}}if(t==O&&!p){var n=e.getAttribute(O);h&&W("Checking[attribute,+"+r+"+,srcset]==>"+n);var o=z(n);o&&o.trim().length>0&&n!=o&&(h&&W("Changing[attribute,"+r+",srcset]==>"+o),e.setAttribute(O,o),e.setAttribute(D,"1"))}}else if(("div"==r||r==w||r==N||r==L||"a"==r)&&t==y){var d=e.getAttribute(y);h&&W("Checking[attribute,div,"+r+"]==>"+d);var s=B(d);s&&s.trim().length>0&&d!=s&&(h&&W("Changing[attribute,div,"+r+"]==>"+s),e.setAttribute(y,s),e.setAttribute(D,"1"))}}function q(e){var t,r,a;for(a=0;a0&&"1"==t.addedNodes[0].nodeType?(r=t.addedNodes[0].getAttribute(D))&&"1"==r||S(t.addedNodes[0]):"attributes"!=t.type||"1"!=t.target.nodeType||(r=t.target.getAttribute(D))&&"1"==r||U(t.target,t.attributeName))}var G="object"==typeof global&&global&&global.Object===Object&&global,H="object"==typeof self&&self&&self.Object===Object&&self,J=G||H||Function("return this")(),K="object"==typeof exports&&exports&&!exports.nodeType&&exports,P=K&&"object"==typeof module&&module&&!module.nodeType&&module;P?((P.exports=j).enableMarvel=j,K.enableMarvel=j):(J.enableMarvel=j,j(null))}();